package com.example.orchid.paper.exception;

/**
 * 自定义异常类
 * Created by Orchid on 2015-10-13.
 */
public class PaperException extends Exception {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    // 未知错误
    public static final String UNKONWEN_ERORR = "-1";

    // 连接超时
    public static final String CONNECTED_ERORR = "-1001";

    // 解析JSON错误
    public static final String PARSE_ERORR = "-1002";

    protected String errorCode = UNKONWEN_ERORR;

    public PaperException(String detailMessage) {
        super(detailMessage);
    }

    public PaperException(String detailMessage, Exception cause) {
        super(detailMessage, cause);
    }

    public String getErrorCode() {
        return errorCode;
    }
}
